import { createI18n } from 'vue-i18n'
import { LANGUAGES } from '@/utils/i18n'

// 创建i18n实例
const i18n = createI18n({
  legacy: false,
  locale: localStorage.getItem('APP_LANGUAGE') || 'zh',
  fallbackLocale: 'zh',
  messages: {
    zh: {
      dashboard: {
        myMarketing: '我的营销',
        emailStats: '邮件统计',
        updateTime: '更新时间'
      },
      dataSource: {
        globalEnterprise: '全球企业库',
        cantonFairPurchasers: '广交会采购商',
        cantonFairExhibitors: '广交会参展商',
        customsTradeInfo: '海关数据',
        linkedInData: 'LinkedIn获客',
        facebookData: 'Facebook获客',
        twitterUsers: 'Twitter获客'
      }
    },
    en: {
      dashboard: {
        myMarketing: 'My Marketing',
        emailStats: 'Email Statistics',
        updateTime: 'Update Time'
      },
      dataSource: {
        globalEnterprise: 'Global Enterprise Library',
        cantonFairPurchasers: 'Canton Fair Purchasers',
        cantonFairExhibitors: 'Canton Fair Exhibitors',
        customsTradeInfo: 'Customs Trade Info',
        linkedInData: 'LinkedIn Leads',
        facebookData: 'Facebook Leads',
        twitterUsers: 'Twitter Users'
      }
    }
  }
})

export default i18n 